#ifndef __CARIOU_LINARD_SOLIDOBJECT_HH__
#define __CARIOU_LINARD_SOLIDOBJECT_HH__

#include "point3d.h"
#include "vector3d.h"
#include "color.h"
#include "ray.h"
#include "intersection.h"
#include "texture.h"

#include <stdio.h>

class SolidObject : public Point3D
{
    protected:

        Color     material;
        Texture * texture;

        double  diffuse;
        double  specular;
        double  specularPower;
        double  reflective;
        double  refractive;
        double  refractiveN;

        Vector3D XVec;
        Vector3D YVec;


    public:

        SolidObject();
        virtual ~SolidObject();
        SolidObject(const SolidObject &);
        virtual SolidObject& operator=(const SolidObject &);

        SolidObject(const Point3D &, const Color &);
        SolidObject(const double &, const double &, const double &, const double &, const double &, const double &);


        virtual void  setColor(const Color &);
        virtual void  setColor(const double &, const double &, const double &);

        virtual void setMaterialComponents(const double &,const double &,const double &,const double &,const double &, const double &);

        virtual Color getColor() const;

        virtual Color  getDiffuseColor()    const;
        virtual double getSpecularCoef()    const;
        virtual double getSpecularPower()   const;
        virtual double getReflectiveCoef() const;
        virtual double  getRefractiveCoef() const;
        virtual double getRefractiveNumber() const;

        virtual void attachTexture(Texture *);

        virtual bool   isReflective() const;
        virtual bool   isRefractive() const;
        bool isTextured() const;

        inline void setXVec(const Vector3D &vec) { XVec = vec; }
        inline void setYVec(const Vector3D &vec) { YVec = vec; }

        virtual void texturing(const Intersection &)=0;
        virtual void intersection(const Ray &,Intersection &) const=0;
        virtual void getNormalVectorAt(const Point3D &, Vector3D &) const=0;
};

#endif
